<?php

namespace app\models;

use Yii;

/**
 * This is the model class for table "mops_coupon_category".
 *
 * @property int $id
 * @property string $name 分类名称
 * @property string $image 分类logo
 * @property string $max_price 满减金额
 * @property string $min_price 满减金额
 */
class CouponCategory extends \yii\db\ActiveRecord
{
    /**
     * {@inheritdoc}
     */
    public static function tableName()
    {
        return 'mops_coupon_category';
    }

    /**
     * {@inheritdoc}
     */
    public function rules()
    {
        return [
            [['name', 'image'], 'required'],
            [['max_price', 'min_price'], 'number'],
            [['name'], 'string', 'max' => 100],
            [['image'], 'string', 'max' => 255],
        ];
    }

    /**
     * {@inheritdoc}
     */
    public function attributeLabels()
    {
        return [
            'id' => 'ID',
            'name' => 'Name',
            'image' => 'Image',
            'max_price' => 'Max Price',
            'min_price' => 'Min Price',
        ];
    }
}
